<#include "/macro.include"/>
package ${basepackage}.model;

import java.lang.*;
import java.util.*;

public class ${table.className}  implements java.io.Serializable{
	private static final long serialVersionUID = 54541558253146326L;

	public static final String TABLE_ALIAS = "${table.tableAlias}";
	<#list table.columns as column>
	  <#if (column.columnAlias?index_of("#")) gt -1>
	public static final String ALIAS_${column.constantName} = "${column.columnAlias?substring(0,column.columnAlias?index_of("#"))}";
	  <#else>
	public static final String ALIAS_${column.constantName} = "${column.columnAlias}";
	  </#if>
	</#list>

	<#list table.columns as column>
	/**
	 * @since ${column.columnAlias!}
	 */
	private ${column.simpleJavaType} ${column.columnNameLower};
	<#if  column.columnNameLower="cmsstate" >
	private String cmsstateString;
	public String getCmsstateString() { return cmsstateString; }
	public void setCmsstateString(String cmsstateString) { this.cmsstateString = cmsstateString; }
	</#if>
	</#list>

	<#list table.columns as column>
	<#if column.isDateTimeColumn>
	public String get${column.columnName}String(String format) { return javacommon.util.safe.SafeUtils.formatDate(get${column.columnName}(), format); }
	
	public void set${column.columnName}String(String value) { set${column.columnName}(javacommon.util.safe.SafeUtils.safeGetDate(value)); }
	</#if>	
	public void set${column.columnName}(${column.simpleJavaType} value) {
		<#if  column.columnNameLower="cmsstate" >
		setCmsstateString(javacommon.util.SystemConst.INSYN_STATUS.getString(value));
		</#if>
		this.${column.columnNameLower} = ${column.columnNameLower};
	}
    
	public ${column.simpleJavaType} get${column.columnName}() {
		return this.${column.columnNameLower};
	}
<#if (column.columnAlias?index_of("#")) gt -1>
    public String get${column.columnName}Enum() { return javacommon.util.safe.SafeUtils.getEnumStrValue(get${column.columnName}(),"${column.columnAlias?substring(column.columnAlias?index_of("#")+1)}"); }
    
</#if>	
	
</#list>


    /** Model转化成String */ 
    public String toString() {
	    return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this,org.apache.commons.lang.builder.ToStringStyle.DEFAULT_STYLE);
    }

}
